using UnityEngine;
using UnityGameFramework.Runtime;

namespace ProjectMG
{
    [RequireComponent(typeof(UITimingControlFormView))]
    public class UITimingControlFormLogic : UGUIForm
    {
        private UITimingControlFormView m_UIView;

        protected override void OnInit(object userData)
        {
            base.OnInit(userData);
            m_UIView = GetComponent<UITimingControlFormView>();
        }

        protected override void OnOpen(object userData)
        {
            base.OnOpen(userData);
        }

        protected override void OnClose(bool isShutdown, object userData)
        {
            base.OnClose(isShutdown, userData);
        }

        public override void OnClick(GameObject btnObj)
        {
            if (btnObj == m_UIView.CenserBtn.gameObject)
            {
                UICamera.FadeToUIGroupCamera(0.5f, 2f, 0.5f);
            }
        }
    }
}